/** @format */

import React, {Component} from 'react';
import {
  Image,
  Platform, 
  StyleSheet,
  Text,
  View,
  NetInfo
} from 'react-native';
import BaseStyle from "../styles/baseStyle"
import {Size} from "../constStr.js"
import Tools from "../tools/tool.js"


import Icon from "../components/react-native-iconfont/IconFont.js"
import {Header,Container,Tabs,Tab,ScrollableTab,Content} from "native-base";
export default class HomeIndexScreen extends Component {
    static navigationOptions = {
      title: '兼职',
      tabBarIcon: ({tintColor,focused}) => (
        <Icon name={focused?"home-check":"home-not-selected"} size={22} color={tintColor}/>
      ),
    };
    constructor(props) {
        super(props);
        this.state={
          data:{
            banner:[]
          }
        }

    }
    componentDidMount(){

    }

     renderHeader(){
      return(<View style={{backgroundColor:"#FAFAFA"}}>
                <View style={{height:140,backgroundColor:"#FAFAFA"}}>
                    {this.state.data&&this.state.data.banner?
                    <Swiper style={styles.wrapper} autoplay={true} paginationStyle={{bottom:5}} activeDotColor={"#4F4F4F"} dotColor="#F8F8FF" activeDotStyle={{width:5,height:5}} dotStyle={{width:5,height:5}}>
                        {this.state.data.banner.map((item,index)=>{
                          return( <TouchableOpacity key={index} style={{justifyContent:"center"}} activeOpacity={0.9} onPress={()=>this.onPressBanner(item)}>
                                    <Image source={{uri:item.picture}} style={{width:screenWidth,height:140}}/>
                                  </TouchableOpacity>)
                        })}
                    </Swiper>:null}
                </View>
            </View>)
      
    }
    render() {
        return(<Container>

              </Container>)
    }
}

const styles = StyleSheet.create({
  tab:{
    backgroundColor:"#fff",
    paddingLeft:0,
    paddingRight:0,
  }
});
